#pragma once

#include <QDialog>
#include "GeneratedFiles/ui_ChooseAdapterDlg.h"
#include "utilities/utilities.h"

class FrameCapturer;
class Adapter;
class QModelIndex;
class CaptureOption;

class ChooseAdapterDlg : public QDialog , public Ui::AdapterChoiceDlg
{
	Q_OBJECT
public:
	ChooseAdapterDlg(QWidget* parent = NULL);
	FrameCapturer* getCapturer() {
		return m_Capturer;
	}

	shared_ptr<CaptureOption> getOption() {
		return mCurOption;
	}
private:
	QString m_Choice;
	
private slots:
	void onOpenAdapter();
	void onOpenOption();
	void onItemClicked(const QModelIndex& index);
	
private:
	FrameCapturer* m_Capturer;
	QVector<shared_ptr<Adapter> > m_Adapters;
	QFont mItemFont;
	shared_ptr<CaptureOption> mCurOption;
};